#ifndef _DATA_ACTION
#define _DATA_ACTION

#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>

#include "log.h"
#include "cpe.h"
#include "fault.h"
#include "method.h"
#include "obj.h"
#include "persister.h"
#include "inform.h"
#include "download.h"
#include "transfer_complete.h"
#include "schedule_inform.h"
#include "get_param_values.h"

//#include <gatewayconfig.h>
//change must synchrony with struct mib_param_values
struct param_values
{
    //char name[257];
    char *name;
    //char value[8192];
    char *value;
    int type;
    struct param_values *next;
};

extern void para_value_free(struct param_values *node);

struct param_attributes
{
    char name[257];
    //char *name;
    int notification;
    char access_list[65];
    struct param_attributes *next; 
};

//change must synchrony with  struct mib_param_names_response
struct param_names_response
{
    char name[257];
    //char *name;
    int writeable;
    struct param_names_response *next;
};



extern int evcpe_mib_to_param_name_list(const char *path, struct evcpe_param_info_list *list, int next_level);
extern int evcpe_mib_to_param_attr_list(const char *name, struct evcpe_param_attr_list *list);
extern int evcpe_mib_to_param_value_list(const char *name, struct evcpe_param_value_list *list);
extern int evcpe_param_value_to_mib(struct evcpe *cpe, struct evcpe_set_param_value_head *head);
extern int evcpe_add_object_to_mib(char *name, unsigned int *index);
extern int evcpe_del_object_from_mib(char *name);
extern int evcpe_param_attr_to_mib(struct evcpe_set_param_attr_head *head);
int evcpe_reboot_prepare(const char *cmdkey);
int evcpe_resetfactory(void);
int evcpe_transfer_request(enum evcpe_method_type method_type, 
		struct evcpe_download *download);
int evcpe_contact_69sh(const char *commamd_key, char **ev_list_str);
inline int evcpe_get_inform_content(struct evcpe *cpe, struct evcpe_event_list *event_list, struct evcpe_inform *inform, int is_value_change);
inline int evcpe_inform_complete_report(int is_value_change);
inline int evcpe_get_trans_complete_info(
		struct evcpe_transfer_complete *complete, int jobNum);
void get_tr69wan_path_ip();

#endif
